import { S } from '../../s';
import { IPSApplication } from '../ipsapplication';
import { IPSAppWF } from './ipsapp-wf';
import { IPSAppWFVer } from './ipsapp-wfver';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSAppWFVerImpl extends PSModelObjectImpl implements IPSAppWFVer {
  get codeName(): string {
    return this.M.codeName;
  }

  protected psappwf: IPSAppWF;
  getPSAppWF(): IPSAppWF | null {
    if (this.psappwf != null) return this.psappwf;
    const value = this.M.getPSAppWF;
    if (value == null) {
      return;
    }
    const ipsapplication = this.getParentPSModelObject(
      S._26e,
    ) as IPSApplication;
    if (ipsapplication != null) {
      this.psappwf = ipsapplication.findPSAppWF(value);
    }
    return this.psappwf;
  }
  get cls(): string {
    return 'PSAppWFVerImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._90) return true;
    return super.instanceof(cls);
  }
}
